﻿using UnityEngine;
using System.Collections;

public class Guns : Actor 
{
	public GameObject bulletPrefab;
	
	/*protected override void ActorAwake()
	{
		PoolDescription pd = new PoolDescription();
		pd.name = gunPrefab.name;
		pd.allowRuntimeObjectCreation = true;
		pd.initialPoolSize = 100;
		pd.masterPrefab = gunPrefab;
		pd.allowRuntimeObjectCreation = true;
		
		PoolManager.Instance.AddPool(pd);
	}*/
	
	public void Shoot()
	{
		/*PoolManager.Instance.GetObjectFromPool(gunPrefab.name);*/
		Instantiate(bulletPrefab, transform.position, transform.rotation);
	}
	public void EnemyShoot(Vector3 _position, Quaternion _rotation)
	{
		Instantiate(bulletPrefab, _position, _rotation);
	}
}